package com.zhoukx.command;

/**
 * @ClassName LightOffCommand
 * @Description:
 * @Author zhoukx
 * @Date 2020/8/17
 **/
public class LightOffCommand implements Command {

    LightReceiver lightReceiver;

    public LightOffCommand(LightReceiver lightReceiver) {
        this.lightReceiver = lightReceiver;
    }

    @Override
    public void execute() {
        lightReceiver.on();
    }

    // 关闭
    @Override
    public void undo() {
       lightReceiver.off();
    }
}
